import com.sun.org.apache.bcel.internal.generic.ARETURN;

import java.io.FileWriter;
import java.util.*;

/**
 * Created whit IntelliJ IDEA.
 * Description：
 * User：ZHONGCHEN
 * Date:2022-03-29
 * Time:18:32
 */
public class TestDemo {
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int startYear = scanner.nextInt();
            int startMonth = scanner.nextInt();
            int startDay = scanner.nextInt();
            int endYear = scanner.nextInt();
            int endMonth = scanner.nextInt();
            int endDay = scanner.nextInt();
            Set<Integer> set = new HashSet<>();
            set.add(2);
            set.add(3);
            set.add(5);
            set.add(11);
            set.add(7);
            int[] dayStart = new int[13];
            dayStart = new int[]{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
            int ans = 0;
            while (startYear <= endYear) {
                boolean flag = ifRunYear(startYear);
                if (flag) {
                    dayStart[2] = 29;
                } else {
                    dayStart[2] = 28;
                }
                if (startYear == endYear) {
                    //同年
                    while (startMonth <= endMonth) {
                        if (startMonth == endMonth) {
                            //同月
                            if (set.contains(startMonth)) {//是素月
                                if (startDay == 1) {
                                    ans += endDay;
                                } else {
                                    ans += (endDay - startDay + 1);
                                }
                            } else {//不是素月
                                if (startDay == 1) {//从第一天开始算
                                    ans += endDay * 2;
                                } else {//不从第一天开始算
                                    ans += (endDay - startDay + 1) * 2;
                                }
                            }
                            startMonth++;
                        } else {//不同月
                            if (set.contains(startMonth)) {
                                if (startDay == 1) {
                                    ans += dayStart[startMonth];
                                } else {
                                    ans += dayStart[startMonth] - startDay + 1;
                                    startDay = 1;
                                }
                            } else {
                                if (startDay == 1) {
                                    ans += dayStart[startMonth] * 2;
                                } else {
                                    ans += (dayStart[startMonth] - startDay + 1) * 2;
                                }
                            }
                            startMonth++;
                        }
                    }
                } else {
                    //不同年
                    while (startMonth <= 12) {
                        if (set.contains(startMonth)) {
                            if (startDay == 1) {
                                ans += dayStart[startMonth];
                            } else {
                                ans += dayStart[startMonth] - startDay + 1;
                                startDay = 1;
                            }
                        } else {
                            if (startDay == 1) {
                                ans += dayStart[startMonth] * 2;
                            } else {
                                ans += (dayStart[startMonth] - startDay + 1) * 2;
                            }
                        }
                        startMonth++;
                    }
                }
                startMonth = 1;//满一年 月重置
                startYear++;//年相加
            }
            System.out.println(ans);
        }
    }

    private static boolean ifRunYear(int years) {
        if ((years % 400 == 0) || (years % 4 == 0 && years % 100 != 0)) {
            return true;
        }
        return false;
    }

    private static int[] fib = new int[100001];

    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);
        fib[0] = 1;
        fib[1] = 1;
        for (int i = 2; i < fib.length; i++) {
            fib[i] = (fib[i - 1] + fib[i - 2]) % 1000000;
        }
        while (scanner.hasNext()) {
            int ans = scanner.nextInt();
            System.out.printf((ans < 25 ? "%d\n" : "%06d\n"), fib[ans]);
        }
    }

    //1606. 找到处理最多请求的服务器
    public static void main3(String[] args) {
        int[] arrival = {1, 2, 3, 4, 5};
        int[] load = {5, 2, 3, 3, 3};
        System.out.println(busiestServers(3, arrival, load));
    }

    public static List<Integer> busiestServers(int k, int[] arrival, int[] load) {
        //有序集合-TreeSet
        //存储空闲的服务器
        TreeSet<Integer> available = new TreeSet<>();
        for (int i = 0; i < k; i++) {
            available.add(i);
        }
        int[] requests = new int[k];
        //存储繁忙的服务器
        PriorityQueue<int[]> busy = new PriorityQueue<>(new Comparator<int[]>() {
            @Override
            public int compare(int[] o1, int[] o2) {
                return o1[0] - o2[0];
            }
        });
        int length = arrival.length;
        for (int i = 0; i < length; i++) {
            //假设当前到达的请求为第 i 个，如果busy 不为空，
            // 那么我们判断 busy 的队首对应的服务器的结束时间是否小于等于当前请求的到达时间
            // arrival[i]，如果是，那么我们将它从busy中移除，并且将该服务器的编号放入available 中
            while (!busy.isEmpty() && busy.peek()[0] <= arrival[i]) {
                available.add(busy.poll()[1]);
            }
            //再次进行判断。如果available 为空，那么该请求被丢弃
            if (available.isEmpty()) {
                continue;
            }
            //否则查找available 中大于等于 i%k 的第一个元素，如果查找成功，
            // 那么将它作为处理请求的服务器，否则将available 中编号最小的服务器作为处理请求的服务器
            Integer tmp = available.ceiling(i % k);//ceiling 返回大于指定元素(element)的那些元素中的最小元素
            if (tmp == null) {
                tmp = available.first();
            }
            //将requests[i] 加 1
            requests[tmp]++;
            //将该服务器从 available 移除，然后将服务器 i 放入busy 中，对应的处理结束时间为
            //arrival[i]+load[i]
            busy.offer(new int[]{arrival[i] + load[i], tmp});
            available.remove(tmp);
        }
        int max = 0;
        List<Integer> ans = new ArrayList<>();
        for (int i = 0; i < k; i++) {
            if (requests[i] > max) {
                max = requests[i];
                ans.removeAll(ans);
                ans.add(i);
            } else if (requests[i] == max) {
                ans.add(i);
            }
        }
        return ans;
    }

    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String str1 = scanner.next();
            String str2 = scanner.next();
            int length2 = str2.length();
            int length1 = str1.length();
            int count = 0;
            for (int i = 0; i < length1; i++) {
                //若第一个字母相同则继续比较下去
                if (str1.charAt(i) == str2.charAt(0)) {
                    boolean flag = true;
                    int j = 0;
                    for (j = 0; j < length2; j++) {
                        if (i + j < length1 && str2.charAt(j) != str1.charAt(j + i)) {
                            flag = false;
                            break;
                        }
                    }
                    if (i + j < length1 + 1 && flag) {
                        count++;
                        i += length2 - 1;
                    }
                } else {
                    //若第一个字母都不同就跳下一个字母
                    continue;
                }
            }
            System.out.println(count);
        }
    }

    private static long[] fibs = new long[81];

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int from = scanner.nextInt();
            int to = scanner.nextInt();
            long ans = 0;
            Fibonacci();
            for (int i = from; i <= to; i++) {
                ans += fibs[i];
            }
            System.out.println(ans);
        }
    }

    private static void Fibonacci() {
        fibs[0] = 0;
        fibs[1] = 1;
        fibs[2] = 1;
        for (int i = 3; i < fibs.length; i++) {
            fibs[i] = fibs[i - 1] + fibs[i - 2];
        }
    }
}
